home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 626-637 / disk_635 / powerlogo / utilities.doc < prev    next >
Text File  |  1992-05-06  |  8KB  |  241 lines

  1.  
  2.    Utilities.doc
  3.  
  4.    The LOGO program file "Utilities" when loaded, sets the amount of memory
  5. LOGO holds in reserve, scrambles the random number generater, defines some
  6. useful numerical constants, defines some utility procedures, and adds a
  7. menu to the LOGO user interface. This is an example of how a file may be
  8. used to extened LOGO. Similar files may be used to set up LOGO in any way
  9. you like. You may run LOGO by clicking the "Utilities" icon, and all of
  10. this will be loaded automatically.
  11.  
  12.  
  13. The Utilities menu items:
  14.  
  15.    Load           Load a LOGO program file. Gets a file name from the
  16.                   file requester.
  17.  
  18.    Save           Each of these saves contents of variables to a LOGO
  19.                   program file. Gets the file name from the file requester.
  20.       Names          Saves variables other than procedures.
  21.       Procs          Saves variables that are procedures.
  22.       All            Saves all variables.
  23.  
  24.    Interrupt      Interrupt a program. This is like the break key (CTRL G)
  25.                   except you may continue by giving the command "cont".
  26.  
  27.    Top Level      Stop a program. This is similar to the break
  28.                   key (CTRL G).
  29.  
  30.    End            Stop a program, and close all files, turtles, windows,
  31.                   and screens.
  32.  
  33.    Restart        Close windows, screens, and files, erase all procedures,
  34.                   and variables except those defined in this file
  35.  
  36.    Quit           Exit from LOGO.
  37.  
  38.  
  39. Numerical constants:
  40.  
  41.    If you need these, you won't have to type all these digits.
  42.  
  43.    :e    =  2.71828182845904523536
  44.    :pi   =  3.14159265358979323846
  45.  
  46.  
  47. Utility procedures:
  48.  
  49. all
  50.    Output list of all variable names.
  51.  
  52. allnames
  53.    Output list of names that contain something other than procedures.
  54.  
  55. allprocs
  56.    Output list of names that contain to procedures.
  57.  
  58. dr             ( path pattern )
  59.                ( path pattern-list )
  60.          path = An AmigaDOS directory name (word or list).
  61.          pattern = Word, a match pattern. Within a pattern the asterisk
  62.                    (*) is a wild card and will match any group of zero
  63.                    or more characters. A pattern that starts with a
  64.                    tilde (~) will match anything that does not match the
  65.                    rest of the pattern.
  66.          pattern-list = A list of patterns.
  67.    Print out contents of directory.
  68.  
  69. dra            ( path pattern )
  70.                ( path pattern-list )
  71.          path = An AmigaDOS directory name (word or list).
  72.          pattern = Word, a match pattern. Within a pattern the asterisk
  73.                    (*) is a wild card and will match any group of zero
  74.                    or more characters. A pattern that starts with a
  75.                    tilde (~) will match anything that does not match the
  76.                    rest of the pattern.
  77.          pattern-list = A list of patterns.
  78.    Print out contents of directory, and all sub directories.
  79.  
  80. edit           name
  81.                name-list
  82.          name = Word, a variable name.
  83.          name-list = List of names.
  84.    Edit the contents of specified variables. This procedure works by
  85.    calling the "QED" text editor by Darren M. Greenwald. You may replace
  86.    "QED" with a call to the text editor of your choice.
  87.  
  88. end
  89.    Closes all files, windows, and screens, returns to toplevel.
  90.  
  91. filter         list list
  92.          list = Any list.
  93.    Output list of all items in the second list except the items that are
  94.    in the first list.
  95.  
  96. ignore         object ( object... )
  97.    Does nothing. Ignores the output of an operation.
  98.  
  99. initmenu
  100.    Set up the command window menus and demons.
  101.  
  102. interupt
  103.    A LOGO command shell that may be run from within other procedures.
  104.  
  105. link           name
  106.          name = Word, a procedure name.
  107.    Output list of all procedures needed to run the named procedure.
  108.  
  109. lower          object
  110.          object = Any word or list.
  111.    Output is just like input with all upper case letters converted to
  112.    lower case.
  113.  
  114. matchp         pattern word
  115.                pattern-list word
  116.          pattern = Word, a match pattern. Within a pattern the asterisk
  117.                    (*) is a wild card and will match any group of zero
  118.                    or more characters. A pattern that starts with a
  119.                    tilde (~) will match anything that does not match the
  120.                    rest of the pattern.
  121.          pattern-list = A list of patterns.
  122.          word = Any word.
  123.    Output true if word fits pattern.
  124.  
  125. names
  126.    Output list of unburied names that contain something other than
  127.    procedures.
  128.  
  129. patfilter      pattern list
  130.                pattern-list list
  131.          pattern = Word, a match pattern. Within a pattern the asterisk
  132.                    (*) is a wild card and will match any group of zero
  133.                    or more characters. A pattern that starts with a
  134.                    tilde (~) will match anything that does not match the
  135.                    rest of the pattern.
  136.          pattern-list = A list of patterns.
  137.          list = A list of words.
  138.    Output list of all words in the list that fit the pattern.
  139.  
  140. procs
  141.    Output list of unburied names that contain procedures.
  142.  
  143. prosave        file-name name
  144.                file-name name-list
  145.          file-name = An AmigaDOS file name (word or list).
  146.          name = Word, a variable name.
  147.          name-list = List of names.
  148.    Save names, their bindings, and their protection (bury) status to
  149.    file with an icon.
  150.  
  151. restart
  152.    Close windows, screens, and files, erase all procedures, and variables
  153.    except those defined in this file
  154.  
  155. reverse        object ( object )
  156.          object = Any word or list.
  157.    Reverse the order of the items in the object.
  158.  
  159. sdir           ( path pattern )
  160.                ( path pattern-list )
  161.          path = An AmigaDOS directory name (word or list).
  162.          pattern = Word, a match pattern. Within a pattern the asterisk
  163.                    (*) is a wild card and will match any group of zero
  164.                    or more characters. A pattern that starts with a
  165.                    tilde (~) will match anything that does not match the
  166.                    rest of the pattern.
  167.          pattern-list = A list of patterns.
  168.    Output sorted directory list.
  169.  
  170. sdira          ( path pattern )
  171.                ( path pattern-list )
  172.          path = An AmigaDOS directory name (word or list).
  173.          pattern = Word, a match pattern. Within a pattern the asterisk
  174.                    (*) is a wild card and will match any group of zero
  175.                    or more characters. A pattern that starts with a
  176.                    tilde (~) will match anything that does not match the
  177.                    rest of the pattern.
  178.          pattern-list = A list of patterns.
  179.    Output sorted directory list.
  180.  
  181. sort           test list
  182.          test = A compare instruction (word or list).
  183.          list = Any list.
  184.    Sort list based on test.
  185.  
  186. turtle         ( view-modes bit-planes )
  187.          view-modes = Number, viewport modes, sum of: 
  188.                   1 = hires
  189.                   2 = lace
  190.                   4 = extra half brite
  191.          bitplanes = Number of bit planes.
  192.    Prepare screen, window, and turtle for simple turtle graphics.
  193.  
  194. vpr            object
  195.          object = Any word or list.
  196.    Print out contents of lists verticaly.
  197.  
  198.  
  199. Examples:
  200.  
  201.    The procedures described above include tools for sorting, filtering, and
  202. displaying lists, saving, listing, and editing programs, listing
  203. directories, ect. For example, to print a list of all variable names
  204. currently in use, type this command:
  205.  
  206.    vpr all
  207.  
  208. To list just the names of the procedures:
  209.  
  210.    vpr allprocs
  211.  
  212. To list them alphabetecly:
  213.  
  214.    vpr sort [ alphap ] allprocs
  215.  
  216. To save the contents of all variables currently in use:
  217.  
  218.    prosave filerequest all
  219.  
  220. If you have writtin a procedure which includes calls to other procedures,
  221. you may save it, and all other procedures needed to run it, using:
  222.  
  223.    prosave "file-name link "procedure-name
  224.  
  225. To see which other procedures are needed to run one procedure:
  226.  
  227.    vpr link "procedure-name
  228.  
  229. To print out the contents of a directory:
  230.  
  231.    ( dr "dir-name )
  232.  
  233. To print out just the names of files in a directory:
  234.  
  235.    ( dr "dir-name [ * ~*/ ] )
  236.  
  237. To print out just the names of subdirectories in a directory:
  238.  
  239.    ( dr "dir-name "*/ )
  240.  
  241.